//写一个strlen函数

#include <stdio.h>
#include <string.h>

int slen(char a[])
{
	int i=0;
	while(a[i]!='\0')
		i++;
	return (i-1);
}

int main()
{
	char a[81] ;
	fgets(a,81,stdin);
	printf("a的字符长度为%d\n",slen(a));

	return 0 ;
}

//diwutiantang@diwutiantang-VirtualBox:~/snap/lc/Dec/1219/zuoye$ ./6
//abcdefg
//a的字符长度为7
//diwutiantang@diwutiantang-VirtualBox:~/snap/lc/Dec/1219/zuoye$ ./6
//asa12837    
//a的字符长度为8

